#ifndef MODALLAYER_H
#define MODALLAYER_H

/**
 * 模态对话框的控制层
 */

#include "cocos2d.h"

USING_NS_CC;

class ModalLayer : public CCLayerColor
{
public:
					ModalLayer();
					virtual ~ModalLayer();
public:
	virtual bool			init(const int zOrder = 0);
	virtual void			onEnter();
	virtual void			onExit();
	virtual bool 			ccTouchBegan(CCTouch* pTouch, CCEvent* pEvent);
	virtual void 			ccTouchMoved(CCTouch* pTouch, CCEvent* pEvent);
	virtual void 			ccTouchEnded(CCTouch* pTouch, CCEvent* pEvent);
	virtual void 			ccTouchCancelled(CCTouch* pTouch, CCEvent* pEvent);
public:
	void				addACanTouchLayer(CCTouchDelegate* pLy);
	void				removeCanTouchLayer(const CCTouchDelegate* pLy);
	virtual int			show();

protected:
	CCMenu*				_pMenu;
	CCTouch* 			_pTouch;
private:
	CCArray*			_touchLayerArr;
};

#endif // MODALLAYER_H
